import type {SysFileForm} from "@/api/sysFile/model";
import SysFileAPI from "@/api/sysFile/index";
import type {IModalConfig} from "@/components/PageModal/index.vue";

const modalConfig: IModalConfig<SysFileForm> = {
    pageName: "sysFile",
    dialog: {
        title: "新增文件图片上传管理",
        width: 800,
        draggable: true,
    },
    form: {
        labelWidth: 100,
    },
    formAction: SysFileAPI.add,
    beforeSubmit(data) {
       //提交之前处理
    },
    formItems: [
            {
                label: "文件名称",
                prop: "fileName",
                type: "input",
                attrs: {
                     placeholder: "请输入文件名称",
                },
            },
            {
                label: "文件路径",
                prop: "filePath",
                type: "input",
                attrs: {
                     placeholder: "请输入文件路径",
                },
            },
            {
                label: "文件大小(字节)",
                prop: "fileSize",
                type: "input",
                attrs: {
                     placeholder: "请输入文件大小(字节)",
                },
            },
            {
                label: "上传者",
                prop: "uploadUserName",
                type: "input",
                attrs: {
                     placeholder: "请输入上传者",
                },
            },
            {
                label: "上传者id",
                prop: "uploadUser",
                type: "input",
                attrs: {
                     placeholder: "请输入上传者id",
                },
            },
    ],
};
export default modalConfig;